package com.le.dub.common;

/**
 * @description:枚举code
 * @author: guole
 * @date: 2020/4/9
 */
public enum  ResultCode {
    /**
     * 成功
     */
    SUCCESS("200", "success"),

    /**
     * 未知错误
     */
    UNKNOWN_ERROR("500", "unkonwn error"),
    /**
     * 未知错误
     */
    NOT_LOGIN("0001", "请登录后访问"),


    /**
     * 密码错误
     */
    PASSWORD_ERROR("0002", "密码错误"),

    /**
     * 用户名不能为空
     */
    USERNAME_EMPTY("0003", "用户名不能为空"),
    /**
     * 用户名和密码不能为空
     */
    USERNAME_PASSWORD_EMPTY("0004","用户名和密码不能为空"),

    GOODS_SELL_OUT("0005","已卖完"),
    GOODS_WAIT("0006","稍等");
    /**
     * 结果码
     */
    private String code;

    /**
     * 结果码描述
     */
    private String msg;


    ResultCode(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}
